package com.haole.ecommercepay.common;

/**
 * @author haole
 * htttp状态码
 */
public enum HttpRes {

    OK(200, "处理成功"),
    NO_CONTENT(204, "处理成功，无返回Body"),
    BAD_REQUEST(400, "处理成功"),
    UNAUTHORIZED(401, "签名验证失败"),
    FORBIDDEN(403, "权限异常"),
    NOT_FOUND(404, "请求的资源不存在"),
    TOO_MANY_REQUESTS(429, "请求超过频率限制"),
    SERVER_ERROR(500, "系统错误"),
    BAD_GATEWAY(502, "服务下线，暂时不可用"),
    SERVICE_UNAVAILABLE(503, "服务不可用，过载保护"),
    ;

    HttpRes(int status, String msg) {
        this.status = status;
        this.msg = msg;
    }

    private int status;

    private String msg;

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }}
